﻿@model EmrDatastructure.EmrDemographic

@{
    ViewBag.Title = "Add new patient";
}

<h2>Add new patient</h2>


@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>EmrDemographic</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.Id)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Id)
            @Html.ValidationMessageFor(model => model.Id)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.PreferredLanguage)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.PreferredLanguage)
            @Html.ValidationMessageFor(model => model.PreferredLanguage)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Gender)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Gender)
            @Html.ValidationMessageFor(model => model.Gender)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Race)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Race)
            @Html.ValidationMessageFor(model => model.Race)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Ethnicity)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Ethnicity)
            @Html.ValidationMessageFor(model => model.Ethnicity)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.DateOfBirth)
        </div>
        <div class="editor-field">
            @* @Html.EditorFor(model => model.DateOfBirth) *@
            <input class="text-box single-line" data-val="true" data-val-required="The DateOfBirth field is required." id="DateOfBirth" name="DateOfBirth" type="text" value="" />
            @Html.ValidationMessageFor(model => model.DateOfBirth)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.LastName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.LastName)
            @Html.ValidationMessageFor(model => model.LastName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.FirstName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.FirstName)
            @Html.ValidationMessageFor(model => model.FirstName)
        </div>

        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Home", "Search", "Home")
</div>

<script type="text/javascript">
    $(function () {
        $("#DateOfBirth").datepicker({
            showOn: "button",
            buttonImage: '@Url.Content("~/Content/images/calendar.gif")',
            buttonImageOnly: true
        });
    });

	</script>